<script src="__JQ__"></script>
<script type="text/javascript" src="__JS__/public.lib.js"></script>
<script type="text/javascript" src="__JS__/jquery.form.js"></script>
<script type="text/javascript" src="__LY__"></script>
<style type="text/css">
    h2{padding: 0px; margin: 0px;}
    button,input,select,textarea{font-size: 100%}
    label,a{text-decoration: none;color: #666666;outline: medium none;text-decoration: none;cursor:pointer; font-size: 12px}
    a:active{text-decoration: none;}
    a:hover{color: #E31939;text-decoration: none;}
    .main-color {color: #f43e83;font-size: 13px;}
    .fr{float: right;}
    .pop-header .pop-close,
    .pop-mask{position: fixed;width: 100%;height: 100%;background: rgba(0,0,0,0.5);left: 0;top: 0;z-index: 100;}
    .pop-con{padding: 10px 10px 20px;background: #fff;position: relative;min-height: 80px;text-align: center;}
    .pop-login .msg-wrap .msg-icon,
    .pop-login .item .icon,
    .pop-login .item-coagent a i{background: url(/Public/img/home/user-icon.png) no-repeat;}
    .pop-login{width: 384px!important;}
    .pop-login .form{width: 306px;margin: 0 auto;}
    .pop-login .form .mt{display: block;overflow: hidden;height: 27px;}
    .pop-login .form .mt h2{height: 27px;line-height: 27px;float: left;color: #666;font-size: 20px;}
    .pop-login .form .mt .right_register{float: right;line-height: 27px;}
    .pop-login .form .mt .right_register .text{float: left;}
    .pop-login .form .mt .right_register .icon{float: left;width: 6px;height: 9px;background: url(/Public/img/home/common-icon.png) no-repeat;background-position: -90px 0;margin: 9px 0 0 4px;}
    .pop-login .form .mc{overflow: hidden;text-align: left;}
    .pop-login .msg-wrap{height: auto;margin: 5px 0;visibility: hidden;}
    .pop-login .msg-wrap .msg-error{position: relative;background: #fff6f7;color: #E31939;border: 1px solid #ff6d82;padding: 3px 10px 3px 40px;line-height: 18px;min-height: 18px;}
    .pop-login .msg-wrap .msg-icon{position: absolute;left: 13px;top: 5px;display: block;width: 14px;height: 14px;background-position: 0 0;}
    .pop-login .item{overflow: hidden;height: 38px;position: relative;border: 1px solid #ddd;margin-bottom: 20px;}
    .pop-login .item-error,
    .pop-login .item-focus,
    .pop-login .item .icon{display: block;width: 20px;height: 20px;position: absolute;left: 10px;top: 9px;}
    .pop-login .item .text{line-height: 38px;height: 38px;border: 0;padding: 0 0 0 40px;width: 100%;float: none;overflow: hidden;font-size: 14px;}
    .pop-login .item-name .icon{background-position: 0 -15px;}
    .pop-login .item-password .icon{background-position: 0 -36px;}
    .pop-login .safety{margin-bottom: 15px;overflow: hidden;line-height: 18px;}
    .pop-login .safety .checkbox{vertical-align: middle;}
    .pop-login .login-btn{margin-bottom: 20px;}
    .pop-login .login-btn .btn-img{width: 100%;height: 35px;font-size: 14px;color: #FFF;background: #E31939;text-align: center;line-height: 35px;text-decoration: none;cursor: pointer;letter-spacing: 2px;border: none;}
    .pop-login .item-coagent{height: 24px;line-height: 24px;overflow: hidden;}
    .pop-login .item-coagent a{float: left;height: 24px;padding-left: 26px;position: relative;margin-right: 25px;}
    .pop-login .item-coagent a i{display: block;width: 24px;height: 24px;position: absolute;left: 0;top: 0;}
    .pop-login .item-coagent a i.weixin{background-position: -24px 0;}
    .pop-login .item-coagent a i.qq{background-position: -24px -25px;}
    .pop-login .item-coagent a i.sina{background-position: -24px -50px;}
    .pop-login .item-coagent a i.alipay{background-position: -24px -76px;}
    .pop-login .item-coagent a.last{margin: 0;}
</style>

<div id="login" class="pop-login">
    <div class="pop-con">
        <div class="form">
            <div class="mt">
                <h2>用户登录</h2>
                <a href="{:USER_URL}{:U('Login/mobile')}" target="_blank" class="right_register main-color"><span class="text">立即注册</span><i class="icon"></i></a>
            </div>
            <div class="mc">
                <div class="msg-wrap">
                    <div class="msg-error">
                        <i class="msg-icon"></i><span id="msg-error-text" class="msg-error-text"></span>
                    </div>
                </div>
                <div class="item item-name">
                    <i class="icon"></i>
                    <input name="username" id="username" type="text" class="text" value="" tabindex="1" placeholder="手机号/用户名/邮箱">
                </div>
                <div class="item item-password">
                    <i class="icon"></i>
                    <input type="password" name="password" id="password" class="text" value="" tabindex="2" placeholder="密码">
                </div>
                <div class="safety" id="autoentry">
                    <input type="checkbox" value="1" name="remember" id="remember" class="checkbox">
                    <label for="remember" class="mar-b">请保存我这次的登录信息</label>
                    <a class="forget_password fr" href="{:USER_URL}{:U('Login/forgot')}">忘记密码？</a>
                </div>
                <div class="login-btn">
                    <input type="submit" name="submit" class="btn-img" id="loginsubmit" value="立即登录">
                </div>
                <div class="item-coagent">
                    <a href="http://www.taodudu.com/Qlogin/login/type/weixin.html" target="_blank"><i class="weixin"></i>微信登录</a>
                    <a href="http://www.taodudu.com/Qlogin/login/type/qq.html" target="_blank"><i class="qq"></i>QQ登录</a>
                    <a href="http://www.taodudu.com/Qlogin/login/type/sina.html" target="_blank"><i class="sina"></i>微博登录</a>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    var index = parent.layer.getFrameIndex(window.name);
    $('#loginsubmit').on('click', function () {
        var user = $('#username').val();
        var pwd = $('#password').val();
        var data = {username: user, password: pwd};
        var p = Aajax("{:U('Public/do_login')}", data);
        if (p.status) {
            layer.msg(p.info,{time:800});
            parent.layer.close(index);
        } else {
            layer.msg(p.info);
        }
    });
</script>